Interface PrivilegeManager

All Superinterfaces:
IPCObject, Process
All Known Implementing Classes:
PrivilegeManagerImpl

public interface PrivilegeManager extends Process
Information provided by the PKI file:

    \class PrivilegeManager
    
    \brief PrivilegeManager handles and manipulates privileges on routers and switches.
    
    \example network().getDevice("Router0").getProcess("PrivilegeManager")
    
Author:
Auto-generated
  • Method Details

    • addCommand

      boolean addCommand(String mode, String command, boolean bAll, int level)
      Information provided by the PKI file:
      
          \brief Adds the specified command to the specified mode at the specified privilege level.
          
          \param mode, the mode to add the command to. Valid modes: user, enable, global.
          \param command, the command of interest.
          \param bAll, true to include all, false to not include all.
          \param level, the privilege level.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      bAll - Takes in a parameter of bAll
      level - Takes in a parameter of level
      Returns:
      boolean Returns a boolean
    • removeCommand

      boolean removeCommand(String mode, String command)
      Information provided by the PKI file:
      
          \brief Removes the specified command from the specified mode.
          
          \param mode, the mode to add the command to. Valid modes: user, enable, global.
          \param command, the command of interest.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      Returns:
      boolean Returns a boolean
    • getModeCount

      int getModeCount()
      Information provided by the PKI file:
      
          \brief Returns the number of modes.
          
          \return int, the number of modes.
          
              
      Returns:
      int Returns a int
    • getModeAt

      String getModeAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the mode at the specified index.
          
          \param index, the index of the mode of interest.
          
          \return string, the mode at the specified index.
          
              
      Parameters:
      index - Takes in a parameter of index
      Returns:
      String Returns a String
    • getCommandForModeCount

      int getCommandForModeCount(String mode)
      Information provided by the PKI file:
      
          \brief Returns the number of commands for the specified mode.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          
          \return int, the number of commands for the specified mode.
          
              
      Parameters:
      mode - Takes in a parameter of mode
      Returns:
      int Returns a int
    • getCommandForModeAt

      Pair<String,CommandPrivilege> getCommandForModeAt(String mode, int index)
      Information provided by the PKI file:
      
          \brief Returns the command string and CommandPrivilege object in the specified mode at the specified index.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          \param index, the index of the command of interest.
          
          \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.
          
              
      Parameters:
      mode - Takes in a parameter of mode
      index - Takes in a parameter of index
      Returns:
      Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
    • getCommandForMode

      Pair<String,CommandPrivilege> getCommandForMode(String mode, String command)
      Information provided by the PKI file:
      
          \brief Returns the command string and CommandPrivilege object in the specified mode for the specified command.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          \param command, the command of interest.
          
          \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.
          
              
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      Returns:
      Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
    • isCommandAdded

      boolean isCommandAdded(String commandStr)
      Information provided by the PKI file:
      
          \brief Returns true if the command is already added, otherwise false.
          
          \param commandStr, command string to check for.
          
          \return bool, true if the command is already added, otherwise false.
          
              
      Parameters:
      commandStr - Takes in a parameter of commandStr
      Returns:
      boolean Returns a boolean